// Copyright 2012 Sergio, Raul, Dorival. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

// STL
#include <iostream>
#include <cmath>

// GemLab
#include "gemlab.h"

using std::cout;
using std::endl;
using GemLab::Array;
using GemLab::String;

int main(int argc, char **argv) try
{
	GemLab::AlphaShape ma(/*NDim*/2);
	ma.AddCloudPoint (0.084, 0.611); //  0, 
	ma.AddCloudPoint (0.086, 0.444); //  1, 
	ma.AddCloudPoint (0.133, 0.701); //  2, 
	ma.AddCloudPoint (0.126, 0.341); //  3, 
	ma.AddCloudPoint (0.198, 0.780); //  4, 
	ma.AddCloudPoint (0.183, 0.196); //  5, 
	ma.AddCloudPoint (0.250, 0.100); //  6, 
	ma.AddCloudPoint (0.232, 0.335); //  7, 
	ma.AddCloudPoint (0.232, 0.487); //  8, 
	ma.AddCloudPoint (0.214, 0.630); //  9, 
	ma.AddCloudPoint (0.270, 0.859); // 10, 
	ma.AddCloudPoint (0.290, 0.721); // 11, 
	ma.AddCloudPoint (0.308, 0.630); // 12, 
	ma.AddCloudPoint (0.320, 0.222); // 13, 
	ma.AddCloudPoint (0.346, 0.379); // 14, 
	ma.AddCloudPoint (0.370, 0.049); // 15, 
	ma.AddCloudPoint (0.451, 0.112); // 16, 
	ma.AddCloudPoint (0.404, 0.525); // 17, 
	ma.AddCloudPoint (0.412, 0.750); // 18, 
	ma.AddCloudPoint (0.406, 0.906); // 19, 
	ma.AddCloudPoint (0.485, 0.815); // 20, 
	ma.AddCloudPoint (0.501, 0.685); // 21, 
	ma.AddCloudPoint (0.498, 0.589); // 22, 
	ma.AddCloudPoint (0.488, 0.440); // 23, 
	ma.AddCloudPoint (0.459, 0.329); // 24, 
	ma.AddCloudPoint (0.498, 0.223); // 25, 
	ma.AddCloudPoint (0.579, 0.269); // 26, 
	ma.AddCloudPoint (0.596, 0.466); // 27, 
	ma.AddCloudPoint (0.609, 0.582); // 28, 
	ma.AddCloudPoint (0.593, 0.709); // 29, 
	ma.AddCloudPoint (0.638, 0.375); // 30, 
	ma.AddCloudPoint (0.659, 0.225); // 31, 
	ma.AddCloudPoint (0.752, 0.415); // 32, 
	ma.AddCloudPoint (0.721, 0.520); // 33, 
	ma.AddCloudPoint (0.741, 0.624); // 34, 
	ma.AddCloudPoint (0.760, 0.275); // 35, 
	ma.AddCloudPoint (0.705, 0.134); // 36, 
	ma.AddCloudPoint (0.803, 0.140); // 37, 
	ma.AddCloudPoint (0.863, 0.262); // 38, 
	ma.AddCloudPoint (0.881, 0.430); // 39, 
	ma.AddCloudPoint (0.867, 0.580); // 40, 
    ma.Generate      (/*initial_alpha*/-1, /*regular*/true);
    ma.WriteVTU      ("alphashape01");
    cout << " File <alphashape01.vtu> generated\n";
	return 0;
}
GEMLAB_CATCH
